//
//  QSVisitNumberCell.m
//  DigitalEconomy_iOS
//
//  Created by Ding on 2020/3/29.
//  Copyright © 2020 DingC. All rights reserved.
//

#import "QSVisitNumberCell.h"

@implementation QSVisitNumberCell
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self configSubView];
    }
    return self;
}

- (void)configSubView{
    [self addSubview:self.numberLabel];
    [self addSubview:self.textLabel];
    [self setSubView];
}

- (void)setSubView{
    [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.top.equalTo(self.mas_top).offset(20);
        make.width.equalTo(self);
    }];
    [self.textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.top.equalTo(self.numberLabel.mas_bottom).offset(7);
        make.width.height.equalTo(self.numberLabel);
    }];
    
}

- (UILabel *)numberLabel{
    if (!_numberLabel) {
        _numberLabel = [[UILabel alloc]init];
        _numberLabel.font = [UIFont systemFontOfSize:24];
        _numberLabel.text = @"55";
        _numberLabel.textColor = [UIColor QSColorBlack434343];
        _numberLabel.backgroundColor = [UIColor clearColor];
        _numberLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _numberLabel;
}

- (UILabel *)textLabel{
    if (!_textLabel) {
        _textLabel = [[UILabel alloc]init];
        _textLabel.text = @"我的组员";
        _textLabel.textAlignment = NSTextAlignmentCenter;
        _textLabel.font = [UIFont systemFontOfSize:12];
        _textLabel.numberOfLines = 0;
        _textLabel.textColor = [UIColor QSColorGray999999];
        _textLabel.backgroundColor = [UIColor clearColor];
    }
    return _textLabel;
}

- (void)setModel:(QSVisitHeaderInfoModel *)model{
    _model = model;
}

@end
